<!--{include(file='head.html')}-->
<script type="text/javascript" src="template/jslib/upload/ajaxupload.js"></script>
<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<form action="<!--{url('admin','tag','tagsave')}-->" method="post" name="submitform" id="submitform">
		<div id="main_c">
		<!--{if $opertype == "edit"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>标签名称：</label>
					<p>
						<input class="input_tx" value="<!--{$tag.tagname}-->" name="tagname" id="tagname" type="text" id="tagname"/>
					</p>
				</li>
				<li>
					<label>更多：</label>
					<p>
						<input type="checkbox" value="1" id="ismore" name="ismore" <!--{if $tag.ismore}-->checked<!--{/if}--> autocomplete="off"	/>
					</p>
				</li>
			</ul>
			<ul class="bk <!--{if !$tag.ismore}-->none<!--{/if}-->" id="formore">
				<li>
					<label>标签链接：</label>
					<p>
						<input class="input_tx" value="<!--{$tag.link}-->" name="link" type="text" />
					</p>
				</li>
				<li>
					<label>标签图片：</label>
					<p>
						<div id="buttonholder"></div>
						<input type="hidden" value="<!--{$tag.pic}-->" name="pic" id="pic"/>
						<span id="uploadpic">
							<!--{if $tag.pic}--><img src="<!--{$tag.pic}-->" /><!--{/if}-->
						</span>
					</p>
				</li>
			</ul>

		<!--{elseif $opertype=="add"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>标签名称：</label>
					<p>
						<input class="input_tx" value="" name="tagname" id="tagname" type="text" />
					</p>
				</li>
				<li>
					<label>更多：</label>
					<p>
						<input type="checkbox" value="1" id="ismore" name="ismore" autocomplete="off"/>
					</p>
				</li>
			</ul>
			<ul class="bk none" id="formore">
				<li>
					<label>标签链接：</label>
					<p>
						<input class="input_tx" value="http://" name="link" type="text" />
					</p>
				</li>
				<li>
					<label>标签图片：</label>
					<p>
						<div id="buttonholder"></div>
						<input type="hidden" value="" name="pic" id="pic"/>
						<span id="uploadpic"></span>
					</p>
				</li>
			</ul>

		<!--{/if}-->
			<div class="bt_bk2">
					<input type="hidden" value="<!--{$opertype}-->"	  name="opertype" />
					<input type="hidden" value="<!--{def($tagid)}-->" name="tagid" />
					<a href="javascript:void(0);" class="btn" onclick="jssubmit('tag');return false;"><span>保存</span></a>
			</div>
		</div>
		</form>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	var uploader = new qq.FileUploader({action:"<!--{url('admin','uploadfile','pic')}-->"});
	$("#ismore").click(function(){
		var func = $(this).prop("checked")  ? "show" : "hide";
		$("#formore")[func]();
	});
});
</script>